package com.chj.dto;

import org.springframework.http.HttpStatus;

public class BaseResponse {

	private int error_code;
	private String error_message;

	public BaseResponse(HttpStatus httpStatus) {
		this.error_code = httpStatus.value();
		this.error_message = httpStatus.getReasonPhrase();
	}

	public BaseResponse(HttpStatus httpStatus, String error_message) {
		this.error_code = httpStatus.value();
		this.error_message = error_message;
	}

	public BaseResponse(String error_message) {
		this.error_code = HttpStatus.INTERNAL_SERVER_ERROR.value();
		this.error_message = error_message;
	}

	public BaseResponse(int error_code, String error_message) {
		super();
		this.error_code = error_code;
		this.error_message = error_message;
	}

	public int getError_code() {
		return error_code;
	}

	public void setError_code(int error_code) {
		this.error_code = error_code;
	}

	public String getError_message() {
		return error_message;
	}

	public void setError_message(String error_message) {
		this.error_message = error_message;
	}
}
